{include file="public/header" /}
        <div class="main-container ace-save-state" id="main-container">
            <script type="text/javascript">
                try{ace.settings.loadState('main-container')}catch(e){}
            </script>

            <div id="sidebar" class="sidebar responsive ace-save-state">
                <script type="text/javascript">
                    try{ace.settings.loadState('sidebar')}catch(e){}
                </script>
                {include file="public/menu" /} 

                <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
                    <i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
                </div>
            </div>

            <div class="main-content">
                <div class="main-content-inner">
                    <div class="breadcrumbs ace-save-state" id="breadcrumbs">
                        <ul class="breadcrumb">
                            <li>
                                <i class="ace-icon fa fa-home home-icon"></i>
                                <a href="#">订单管理</a>
                            </li>
                            <li class="active">订单列表</li>
                        </ul><!-- /.breadcrumb -->

                    </div>

                    <div class="page-content">
                        <div class="row">
                            <div class="col-xs-12">
                                <!-- PAGE CONTENT BEGINS -->
                                <div class="row">
                                    <div class="col-xs-12">
                                        <table id="simple-table" class="table table-striped table-hover">
                                            <thead>
                                                <tr>
                                                    <td>ID</td>
                                                    <td>收件人</td>
                                                    <td>省市县</td>
                                                    <td>地址</td>
                                                    <td>手机号</td>
                                                    <td>套餐</td>
                                                    <td>IP</td>
                                                    <td>创建时间</td>
                                                    <td>操作</td>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                {foreach $list as $vo}
                                                    <tr>
                                                        <td>{$vo.id}</td>
                                                        <td>{$vo.name}</td>
                                                        <td>{$vo.city}</td>
                                                        <td>{$vo.address}</td>
                                                        <td>{$vo.mobile}</td>
                                                        <td>{$vo.items}</td>
                                                        <td>{$vo.user_ip}</td>
                                                        <td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
                                                        <td>
                                                            <a href="javascript:order_shenhe2({$vo.id})">取消处理</a> |
                                                            <a href="javascript:order_delete({$vo.id})">删除</a>
                                                        </td>
                                                    </tr>
                                                {/foreach}
                                            </tbody>
                                        </table>


                                 
                                    </div>

                                    <div class="col-xs-12">
                                                                         
                                        <div class="col-xs-3">
                                            <notempty name="allWorks">
                                            <a href="{:url('order/exp_data')}" class="btn btn-minier btn-primary" target="_blank">导出所有数据</a>
                                            </notempty>
                                        </div>

                                        <div class="col-xs-9">
                                            <div class="dataTables_paginate">
                                                {$list->render()}
                                            </div>
                                        </div>
                                        

                                    </div>

                                </div><!-- /.row -->
                                
                            

                                <!-- PAGE CONTENT ENDS -->
                            </div><!-- /.col -->
                        </div><!-- /.row -->
                    </div><!-- /.page-content -->
                </div>
            </div><!-- /.main-content -->


            <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
                <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
            </a>
        </div><!-- /.main-container -->

        {include file="public/footer" /}
        <script type="text/javascript">
        function order_shenhe2(id){
            $.post("{:url('order/order_shenhe2')}", { "id": id},function(data){
                // layer.close(layer_index);
                if(data.code){
                    layer.msg('操作成功', { time: 1000 }, function(){
                        window.location.reload();
                    });
                }else{
                    layer.msg(data.msg, { time: 1000 }); 
                }
            }, "json");
        }
        function order_delete(id){
            layer.confirm('确认删除该订单（ID:'+id+'）？', {
                btn: ['确认','取消'] //按钮
            }, function(){

                var layer_index = layer.load(1, {
                    shade: [0.1,'#fff']
                });

                $.post("{:url('order/order_delete')}", { "id": id},function(data){
                    layer.close(layer_index);
                    if(data.code){
                        layer.msg('删除成功', { time: 1000 }, function(){
                            window.location.reload();
                        });
                    }else{
                        layer.msg(data.msg, { time: 1000 }); 
                    }
                }, "json");

            }, function(){
                // ...
            });
        }
        </script>
 
    </body>
</html>
